<?php
namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User;
use App\Models\Traits\Btn;
class Admin extends User
{
    //软删除
    use SoftDeletes,Btn;
    //指明软删除的字段名
    protected $dates=['deleted_at'];
    //黑名单
    protected $guarded=[];
    //用户表角色字段属于角色表
    public function role(){
        return $this->belongsTo(Role::class,'role_id');
    }
}
